function People(name, age) {
  console.log('this', this)
  this.name = name
  this.age = age
}

People.prototype.eat = function () {
  console.log(this, this.name)
  return ''
}

function Son(name, age, sex) {
  People.call(this, name, age)
  this.sex = sex
}

function protoExtendWithMdl(parent, son) {
  function Middle() {
    this.constructor = son
  }
  Middle.prototype = parent.prototype
  son.prototype = new Middle()
}

protoExtendWithMdl(People, Son)

let son = new Son('小名', 20)

console.log(son, son.name, son.eat())